home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 (Walnut Creek) / Aminet - June 1993 [Walnut Creek].iso / aminet / gfx / conv / hp2xx_1_04.lha / hp2xx.asc < prev    next >
Text File  |  1992-09-24  |  13KB  |  331 lines

  1.  
  2.  
  3.  
  4. hp2xx(1)                 USER COMMANDS                   hp2xx(1)
  5.  
  6.  
  7.  
  8. NAME
  9.      hp2xx - A HPGL converter into some vector- and  raster  for-
  10.      mats
  11.  
  12. USAGE
  13.      hp2xx [-options] [hpgl-file(s)]
  14.  
  15. OPTION SUMMARY
  16.      Option Format  Default   Description
  17.      -------------------------------------------------------------------------
  18.      General options:
  19.        -f   char *  ""        Name of output file (default: stdout)
  20.        -m   char *  pcl       Mode. Valid: mf,ps, pcl,pcx,atari, vga (DOS only)
  21.        -p   int     1         Pensize [dots] (PCL,PCX,VGA), [1/10 mm] (mf, ps).
  22.                               Valid: 1-4
  23.        -q           off       Quiet mode. No diagnostic output.
  24.        -r   double  0.0       Rotation angle [deg]. -r90 gives landscape
  25.        -s   char *  hp2xx.swp Name of swap file
  26.  
  27.      Size controls:
  28.        -a   double  1.0       Aspect factor. Valid: > 0.0
  29.        -h   double  100       Height   [mm] of picture
  30.        -w   double   -        Width    [mm] of picture. If given, overrides -h
  31.        -x   double   -        Preset xmin value of HPGL coordinate range
  32.        -X   double   -        Preset xmax value of HPGL coordinate range
  33.        -y   double   -        Preset ymin value of HPGL coordinate range
  34.        -Y   double   -        Preset ymax value of HPGL coordinate range
  35.  
  36.      Raster format controls:
  37.        -d   int     75        DPI value (x or both x&y)
  38.        -D   int     75        DPI value (y only)
  39.  
  40.      PCL only:
  41.        -F           off       Send a FormFeed after graphics data
  42.        -i           off       Pre-initialize printer
  43.        -S           off       Use (Deskjet) Special commands
  44.        -o   double  0.0       x offset [mm] of picture (left  margin)
  45.        -O   double  0.0       y offset [mm] of picture (upper margin)
  46.        -d   (see above)       Valid ONLY 300, 150, 100, 75
  47.        -D   (see above)       INVALID for PCL!
  48.  
  49.      PS and PCL:
  50.        -o   double  0.0       x offset [mm] of picture (left  margin)
  51.        -O   double  0.0       y offset [mm] of picture (upper margin)
  52.  
  53.      VGA (on PCs) only:       Hi-Res mode setups:
  54.        -V   int     18        VGA mode byte (decimal)
  55.        -W   int     640       VGA pixel width.
  56.      -------------------------------------------------------------------------
  57.        -H              Show help.
  58.  
  59.  
  60.  
  61.  
  62.  
  63. Sun Release 4.1  Last change: 12 September 1991                 1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. hp2xx(1)                 USER COMMANDS                   hp2xx(1)
  71.  
  72.  
  73.  
  74. DESCRIPTION
  75.      _h_p_2_x_x reads HPGL ASCII source files,  interprets  them,  and
  76.      converts them into either another vector-oriented  format or
  77.      one of  several  rasterfile  formats.  Currently,  its  HPGL
  78.      parser only recognizes a small subset of the HP 7475 command
  79.      subset, basically the absolute or relative Move or Draw com-
  80.      mands,  so  don't  expect  fancier stuff like circles / text
  81.      output / filled polygons. Since  it  only  processes  simple
  82.      vectors, its output can be easily adapted to many formats.
  83.  
  84. GENERAL FUNCTION
  85.      _h_p_2_x_x reads from stdin or from a file if any  given  on  the
  86.      command  line.  You may specify more than one input file (if
  87.      this makes sense at all). The output is written to stdout by
  88.      default.  Use  option -_f _o_u_t_f_i_l_e to specify your output file
  89.      name, or just use output redirection (DOS users beware:  DOS
  90.      limits  output redirection to ASCII data only, so -f is pre-
  91.      ferred).  The program scans the current HPGL source,  writes
  92.      all vectors in internal binary format into a temporary file,
  93.      and concurrently determines the maximal coordinate range. It
  94.      then  processes the vectors by mapping them into a new coor-
  95.      dinate system with a height of 100mm by default exactly cov-
  96.      ering  the  detected  y  range, and by preserving the aspect
  97.      ratio of the original data.  Use option -_h _h_e_i_g_h_t to set the
  98.      desired  height  of  your  output picture; optionally use -_a
  99.      _a_s_p_e_c_t_f_a_c_t_o_r to alter the aspect ratio by the  given  factor
  100.      (aspectfactor  <  1  narrows  your  picture). Alternatively,
  101.      specify the desired picture width using -_w _w_i_d_t_h. The height
  102.      will  then  be automatically generated, as will be the width
  103.      if you control the picture's heigth.  Please  note  that  -_w
  104.      overrides any -_h option!
  105.  
  106.      Option -_r _r_o_t_a_t_i_o_n__a_n_g_l_e (_i_n _d_e_g_r_e_e_s) allows you  to  rotate
  107.      the  object prior to all scaling operations. Its main use is
  108.      to facilitate landscape format: -r90 rotates your whole pic-
  109.      ture,  e.g.  from  portait to landscape format. However, any
  110.      reasonable rotation angle is valid.
  111.  
  112.      If you need to process a series  of  similar  objects  which
  113.      should  be  translated into exactly the same coordinate sys-
  114.      tem, there is a way to override the auto-scaling: First, run
  115.      all  files separately and note the infos on the used coordi-
  116.      nate ranges. Then, pick a range that  will  cover  ALL  your
  117.      pictures.   You  can  now  assign defaults to the internally
  118.      generated range limits by specifying -_x _x_m_i_n,  -_X  _x_m_a_x,  -_y
  119.      _y_m_i_n,  and  -_Y _y_m_a_x. NOTE: Clipping is NOT supported! If any
  120.      picture  coordinate  exceeds  your  limits,  they  will   be
  121.      overwritten.
  122.  
  123.      Use option -_m _m_o_d_e to select the program mode, i.e. the out-
  124.      put  format.  Currently  supported:  mode = "mf" (Metafont),
  125.      "ps" (PostScript), "pcl" (HP-PCL Level  3  format,  suitable
  126.  
  127.  
  128.  
  129. Sun Release 4.1  Last change: 12 September 1991                 2
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. hp2xx(1)                 USER COMMANDS                   hp2xx(1)
  137.  
  138.  
  139.  
  140.      for  printing  on  a  HP Laserjet II, DeskJet, or compatible
  141.      printer), "atari"  (ATARI  screen  format),  or  "pcx"  (PC-
  142.      Paintbrush  format, also accepted by MS-Paintbrush / Windows
  143.      3.0 and many other PC based pixel renderers). On PC's, there
  144.      also  is  a  preview  option  "vga" which supports VGA cards
  145.      ONLY. Default mode is pcl.
  146.  
  147.      If you use a raster format, the  picture  is  rasterized  by
  148.      default  into  a  75  DPI  resolution  image.  Use option -_d
  149.      _D_P_I__v_a_l_u_e to change the resolution, e.g. -d300 will cause  a
  150.      HP LJ-II compatible 300 dpi rasterization. There is a way of
  151.      specifying  a  different  resolution  for  y  direction:  -_D
  152.      _D_P_I__y__v_a_l_u_e,  although  it  is  of  limited  use  yet. It is
  153.      intended for, e.g., support of NEC P6 printers (360x180 DPI)
  154.      and alike in a later release.
  155.  
  156.      If processing large pictures  at  high  resolution  on  low-
  157.      memory  machines, typically under DOS, the program may start
  158.      swapping. Opionally change the swap file by using  -_s  _s_w_a_p_-
  159.      _f_i_l_e, e.g. to speed up processing by swapping to a RAM disk.
  160.  
  161. VECTOR FORMATS
  162.      Currently, two vector formats  are  supported:  _T_e_X/_M_e_t_a_f_o_n_t
  163.      and -I PostScript.  Use -_m _m_f to convert a HPGL drawing into
  164.      a Metafont character to be included into a TeX  document  as
  165.      the  character  "Z"  of  a special font that you may create.
  166.      Edit the metafont source, e.g., to change the letter "Z" for
  167.      another,  or  to  change the line thickness, which is set to
  168.      0.4pt by default.  Use option -_p _p_e_n_s_i_z_e for a limited  con-
  169.      trol over pensize: The actual Metafont pensize will be "pen-
  170.      size * 0.1 mm", with pensize = 1, 2,  3,  or  4.   The  same
  171.      applies  to  -_m _p_s, the PostScript mode. Here, you also need
  172.      to use options -o and -O (see below) for proper  margins  in
  173.      paper  since _h_p_2_x_x puts your picture "flush" to the left and
  174.      upper paper limit by default.
  175.  
  176. RASTER FORMATS
  177.      The following formats are supported: HP-PCL, PCX, ATARI, and
  178.      VGA (preview on PC's).  However, generation of other formats
  179.      is made easy for  programmers  because  of  _h_p_2_x_x'_s  modular
  180.      structure.  The program allocates a bitmap on a line-by-line
  181.      basis, swapping lines to disk if needed, and plots into this
  182.      bitmap.  Depending  on  the  selected  format,  a conversion
  183.      module is then activated, which might easily be replaced  by
  184.      other converters. Add more formats if you like!
  185.  
  186.      Option -_p _p_e_n_s_i_z_e controls the size (in pixels) of the  vir-
  187.      tual plotting pen. The only implemented shape of the pen tip
  188.      is a square of the given length.  Default  pen  size  is  1.
  189.      Specifying  -p4  when in 75 DPI mode will make pretty clumsy
  190.      pictures, while you may prefer -p2 over -p1 when in 300 DPI.
  191.  
  192.  
  193.  
  194.  
  195. Sun Release 4.1  Last change: 12 September 1991                 3
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. hp2xx(1)                 USER COMMANDS                   hp2xx(1)
  203.  
  204.  
  205.  
  206.      PCX: The size of a PCX picture is controlled via its  speci-
  207.      fied  height  and  the  current DPI value. To create a high-
  208.      resolution  PCX  image,  just  increase  the  DPI  value  as
  209.      desired. PCX format does not accept offsets.
  210.  
  211.      ATARI: ST screens (640x400 pixels) can easily be  dumped  to
  212.      files.   Many  programs  accept  graphics by including these
  213.      screen dump files. Graphics filling more than one  screenful
  214.      may  be  split  into  screen-size  blocks and loaded/mounted
  215.      blockwise.  _h_p_2_x_x converts to ATARI screen format by  trying
  216.      to fit the resulting picture into a single screen equivalent
  217.      (max. 400 rows, max. 80 Bytes (640 pixel) per  row).  If  it
  218.      succeeds,  _h_p_2_x_x produces a single output file. Specify ONLY
  219.      its base name (option -f), since _h_p_2_x_x adds the file  exten-
  220.      sion  ".000".  However,  if  more screen blocks are required
  221.      horizontally and/or  vertically,  _h_p_2_x_x  will  automatically
  222.      split the picture into files with extensions ".001" / ".010"
  223.      to a maximum of ".999" in a matrix-like  fashion:  Extension
  224.      ".rrc" indicates a block at row position rr and column posi-
  225.      tion c, counting from 0.  The picture is padded  with  back-
  226.      ground color at its right and lower margins, if needed. File
  227.      compression is not supported yet.  --  By  setting  DPI  and
  228.      height/width,  you implicitely have control over the result-
  229.      ing scan lines or columns. E.g., leaving DPI at its  default
  230.      (-d  75),  and specifying a height of 135mm (-h 135), you'll
  231.      get 400 rows.
  232.  
  233.      PCL: HP-PCL Level 3 format, most useful for  direct  printer
  234.      output. Due to this action, there have been added some extra
  235.      flags and options: Use flag -_i to send a printer initializa-
  236.      tion  sequence  before the actual image. Flag -_F adds a Form
  237.      Feed (FF, hex 0C) after the image  is  completed,  which  is
  238.      what  you may want most of the time. However, overlay print-
  239.      ing of several files is feasible by omitting -F.
  240.  
  241.      For additional control of the picture's  final  position  on
  242.      paper,  you  may  add x or y offsets using -_o _X__o_f_f_s_e_t or -_O
  243.      _Y__o_f_f_s_e_t. _E._g., -_o _2_0 -_O and 20 mm additional left margin.
  244.  
  245.      For DeskJet / DeskJet-plus / DeskJet 500 printers, there are
  246.      some special printer commands. Activate them with flag -_S.
  247.  
  248. EXAMPLES
  249.       % hp2xx -m pcx -f my_output.pcx -d300 -p2 -h50 -a 1.2 my_input.hp
  250.  
  251.         creates a PCX file at 300 DPI of height 50 mm, using an
  252.         aspect factor of 1.2 and a pen size of 2 pixels.
  253.  
  254.       % my_hpgl_generator | hp2xx -o20 -O30 -F -q | lpr -P my_PCL_printer
  255.  
  256.         HPGL output is piped through hp2xx; the resulting PCL code
  257.         is piped to the printer queue, giving an image of height 100 mm
  258.  
  259.  
  260.  
  261. Sun Release 4.1  Last change: 12 September 1991                 4
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. hp2xx(1)                 USER COMMANDS                   hp2xx(1)
  269.  
  270.  
  271.  
  272.         at 75 DPI. An additional left margin of 20mm and upper margin
  273.         of 30mm is created. A formfeed will be added (handy if your
  274.         printer queue does not).
  275.  
  276.       % hp2xx -m vga my_input.hp
  277.  
  278.         (PC only): Preview on VGA screen.
  279.  
  280. AUTHOR
  281.       Heinz W. Werntges,  Biokybernetik,  Geb.  26.12,  Heinrich-
  282.      Heine-Universitaet,
  283.       D-4000 Duesseldorf 1, Germany. Internet:  heinz@biokyb.uni-
  284.      duesseldorf.de
  285.  
  286. DIAGNOSTICS
  287.      The number of ignored and/or unknown HPGL commands is given.
  288.      You  will  be informed if swapping starts. Progress is indi-
  289.      cated by output of dots, each dot representing 10  move/draw
  290.      commands during scanning and plotting, or 10 scan lines dur-
  291.      ing output. Shut off  diagnostic  output  by  specifying  -_q
  292.      (quiet mode).
  293.  
  294. BUGS
  295.      There are many non-implemented HPGL commands. Only few test-
  296.      ing  has  been  done for Postscript and ATARI formats, so be
  297.      prepared for bugs there, and PLEASE report  them  --   thank
  298.      you!
  299.  
  300. SEE ALSO
  301.      HPtoMF(1), D. Donath's HPGL-to-Metafont converter.
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327. Sun Release 4.1  Last change: 12 September 1991                 5
  328.  
  329.  
  330.  
  331.